load("//devtools/tools:defaults.bzl", "ng_project", "ng_web_test_suite", "sass_binary", "ts_test_library")

package(default_visibility = ["//visibility:public"])

sass_binary(
    name = "split_styles",
    src = "split.component.scss",
)

ng_project(
    name = "split",
    srcs = [
        "interface.ts",
        "split.component.ts",
        "splitArea.directive.ts",
        "utils.ts",
    ],
    angular_assets = [
        ":split_styles",
    ],
    deps = [
        "//:node_modules/@angular/common",
        "//:node_modules/@angular/core",
        "//:node_modules/rxjs",
    ],
)

ng_project(
    name = "responsive-split",
    srcs = ["responsive-split.directive.ts"],
    deps = [
        ":split",
        "//:node_modules/@angular/core",
        "//devtools/projects/ng-devtools/src/lib/application-providers:window",
        "//devtools/projects/ng-devtools/src/lib/shared/utils",
    ],
)

ts_test_library(
    name = "responsive-split_test",
    srcs = ["responsive-split.directive.spec.ts"],
    deps = [
        ":responsive-split",
        ":split",
        "//:node_modules/@angular/core",
        "//:node_modules/@angular/platform-browser",
        "//devtools/projects/ng-devtools/src/lib/application-providers:window",
    ],
)

ng_web_test_suite(
    name = "test",
    deps = [
        ":responsive-split_test",
    ],
)
